package com.tdcoding.chat.action;

import java.util.List;

import com.tdcoding.chat.action.common.ActionFilter;
import com.tdcoding.chat.entities.ChatInfo;
import com.tdcoding.chat.helper.Logger;
import com.tdcoding.chat.listener.IChannelFilterListener;

public abstract class BaseAction implements IChannelFilterListener{
	
	public ChatInfo getChatInfo(String packetId, int chatType) {
		ChatInfo builder = new ChatInfo();
		builder.setPacketId(packetId);
		builder.setChatType(chatType);
		builder.setChatDate(System.currentTimeMillis()+"");
		return builder;
	}
	
	public ChatInfo getChatInfo(String packetId, int chatType,int bodyType) {
		ChatInfo builder =new ChatInfo();
		builder.setPacketId(packetId);
		builder.setChatType(chatType);
		builder.setBodyType(bodyType);
		builder.setChatDate(System.currentTimeMillis()+"");
		return builder;
	}

	@Override
	public void handleFilter(String request, List<ActionFilter> lBaseFilters) {
		Logger.println(this, "handleFilter", request,lBaseFilters);
	}

}
